package com.hzsoft.sys.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hzsoft.sys.entity.TblQuestionBank;
import com.hzsoft.sys.mapper.TblQuestionBankMapper;
import com.hzsoft.sys.service.TblQuestionBankService;
@Transactional
@Service("questionBankService")
public class TblQuestionBankServiceImpl implements TblQuestionBankService{
	
	private TblQuestionBankMapper tblQuestionBankMapper;
	
	public TblQuestionBankMapper getTblQuestionBankMapper() {
		return tblQuestionBankMapper;
	}
	@Autowired
	public void setTblQuestionBankMapper(TblQuestionBankMapper tblQuestionBankMapper) {
		this.tblQuestionBankMapper = tblQuestionBankMapper;
	}
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return tblQuestionBankMapper.deleteByPrimaryKey(id);
	}
	public int insert(TblQuestionBank record) {
		// TODO Auto-generated method stub
		return tblQuestionBankMapper.insert(record);
	}
	public int insertSelective(TblQuestionBank record) {
		// TODO Auto-generated method stub
		return tblQuestionBankMapper.insertSelective(record);
	}
	public TblQuestionBank selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return tblQuestionBankMapper.selectByPrimaryKey(id);
	}
	public int updateByPrimaryKeySelective(TblQuestionBank record) {
		// TODO Auto-generated method stub
		return tblQuestionBankMapper.updateByPrimaryKeySelective(record);
	}
	public int updateByPrimaryKey(TblQuestionBank record) {
		// TODO Auto-generated method stub
		return tblQuestionBankMapper.updateByPrimaryKey(record);
	}
	public List<TblQuestionBank> listPageBank(TblQuestionBank bank) {
		// TODO Auto-generated method stub
		return tblQuestionBankMapper.listPageBank(bank);
	}
	
	public int importSt(List<TblQuestionBank> list) {
		int count = 0;
		for(TblQuestionBank nu: list){
			count += tblQuestionBankMapper.insertSelective(nu);
		}
		return count;
	}
	public List listId(String type) {
		// TODO Auto-generated method stub
		return tblQuestionBankMapper.listId(type);
	}

}
